{% if messages %}
<div class="col-sm-12" style="padding-left: 1em;">
    <p class="h4">Warnings</p>
    <table class="table table-condensed list-warnings">
        {% for message in messages %}
            <tr>
            {% if message.message_type == MessageType.CONST %}
                <td>
                    <a class="anchor" href="#pp_var_{{ message.column_name }}"><code>{{ message.column_name }}</code></a> has constant value "{{ message.values['mode'] }}"
                </td>
                <td>
                    <span class="label label-primary">Rejected</span>
                </td>
            {% elif message.message_type == MessageType.CORR %}
                <td>
                    <a class="anchor" href="#pp_var_{{ message.column_name }}"><code>{{ message.column_name }}</code></a> is highly correlated with <a href="#pp_var_{{ message.values['correlation_var'] }}"><code>{{ message.values['correlation_var'] }}</code></a> (ρ = {{ message.values['correlation'] | fmt_numeric }})
                </td>
                <td>
                    <span class="label label-primary">Rejected</span>
                </td>
            {% elif message.message_type == MessageType.RECODED %}
                <td>
                    <a class="anchor" href="#pp_var_{{ message.column_name }}"><code>{{ message.column_name }}</code></a> is a recoding of <a href="#pp_var_{{ message.values['correlation_var'] }}"><code>{{ message.values['correlation_var'] }}</code></a>
                </td>
                <td>
                    <span class="label label-primary">Rejected</span>
                </td>
            {% elif message.message_type == MessageType.HIGH_CARDINALITY %}
                <td>
                    <a class="anchor" href="#pp_var_{{ message.column_name }}"><code>{{ message.column_name }}</code></a> has a high cardinality: {{ message.values['distinct_count'] }} distinct values
                </td>
                <td>
                    <span class="label label-warning">Warning</span>
                </td>
            {% elif message.message_type == MessageType.UNSUPPORTED %}
                <td>
                    <a class="anchor" href="#pp_var_{{ message.column_name }}"><code>{{ message.column_name }}</code></a> is an unsupported type, check if it needs cleaning or further analysis
                </td>
                <td>
                    <span class="label label-warning">Warning</span>
                </td>
            {% elif message.message_type == MessageType.DUPLICATES %}
                <td>
                    Dataset has {{ message.values['n_duplicates'] }} ({{ message.values['p_duplicates'] | fmt_percent }}) duplicate rows
                </td>
                <td>
                    <span class="label label-warning">Warning</span>
                </td>
            {% elif message.message_type == MessageType.SKEWED %}
                <td>
                    <a class="anchor" href="#pp_var_{{ message.column_name }}"><code>{{ message.column_name }}</code></a> is highly skewed (γ1 = {{ message.values['skewness'] | fmt_numeric}})
                </td>
                <td>
                    <span class="label label-info">Skewed</span>
                </td>
            {% elif message.message_type == MessageType.MISSING %}
                <td>
                    <a class="anchor" href="#pp_var_{{ message.column_name }}"><code>{{ message.column_name }}</code></a> has {{ message.values['n_missing'] }} ({{ message.values['p_missing'] | fmt_percent }}) missing values
                </td>
                <td>
                    <span class="label label-default">Missing</span>
                </td>
            {% elif message.message_type == MessageType.INFINITE %}
                <td>
                    <a class="anchor" href="#pp_var_{{ message.column_name }}"><code>{{ message.column_name }}</code></a> has {{ message.values['n_infinite'] }} ({{ message.values['p_infinite'] | fmt_percent }}) infinite values
                </td>
                <td>
                    <span class="label label-default">Infinite</span>
                </td>
            {% elif message.message_type == MessageType.ZEROS %}
                <td>
                    <a class="anchor" href="#pp_var_{{ message.column_name }}"><code>{{ message.column_name }}</code></a> has {{ message.values['n_zeros'] }} ({{ message.values['p_zeros'] | fmt_percent }}) zeros
                </td>
                <td>
                    <span class="label label-info">Zeros</span>
                </td>
            {% elif message.message_type == MessageType.TYPE_DATE %}
                <td>
                    <a class="anchor" href="#pp_var_{{ message.column_name }}"><code>{{ message.column_name }}</code></a> only contains datetime values, but is categorical. Consider applying <code>pd.to_datetime()</code>
                </td>
                <td>
                    <span class="label label-info">Type</span>
                </td>
            {% else %}
                <td colspan="2">Unknown type {{ message['mtype'] }} </td>
            {% endif %}
            </tr>
        {% endfor %}
    </table>
</div>
{% endif %}